#pragma once
#include "LockedObstacle.h"
#include <list>

class Item;

class ItemContainer : public LockedObstacle {
protected:
	std::list<Item*>* m_items;
public:
	ItemContainer(ItemContainerType type, LockType lockType = LT_NONE, bool locked = false);
	ItemContainer(std::ifstream& file);
	~ItemContainer();
	void addItem(Item* item);
	void removeItem(Item* item);
	int getMaxNumItems() const;
	int getNumItems() const;
	void render(float x, float y);
	void logDetails(TextLog& log) const;
	std::list<Item*>* getItems() const;
	std::string getName() const;
	void save(std::ofstream& file) const;
};

inline int ItemContainer::getNumItems() const {return m_items->size();}
inline std::list<Item*>* ItemContainer::getItems() const {return m_items;}